home *** CD-ROM | disk | FTP | other *** search
- /*********************** AEControl *******************************/
- /* if you are using 2.0 NewShell set the s bit (protect dmstxt.rexx +s) */
- /* or whatever.... */
- /* This is the NewShell one. Dmstxt.wsh is the one for Bill Hawes Wshell */
- /*
- to change the text forthe dms file use:
- DTC -s s:warpsig -d s:dmstext.dms
-
- */
-
- /* I was not gonna release this util but what the hell.. This one is for the *
- * Lazy sysop. It automatically adds your own warp test to dms, wrp, lzh and *
- * .doc files... Doc files it adds a control character at the beginning so *
- * a user must down load the file & not view it. then at the end of the .doc *
- * file, it addes your own text. *
- * THE WAY IT WORKS... *
- * change conf.1 thru conf.7 to your own conferences and if you have conf.8 *
- * you can add that but you have to change the do r = 1 to 6 to what ever *
- * is applicable for your bbs. *
- * When a user logs off, this util looks at each conference's upload dir and *
- * if it generates a file in ram: called shit (Ram:Shit) This file consists *
- * of all files in that conferences upload dir. now it proceeds to run thru *
- * this list (RAM:SHIT) and if it finds a .dms, .wrp, .lzh or .doc file, it *
- * processes it, adding your warp text. after it processes the file it moves *
- * it to newdir, in mycase its called request: this is an assigned dir of *
- * mine that is in every conferences path so a user can still download these *
- * files, but since I haven't looked at them yet, I want them in a single *
- * dir.. SO you gotta change newdir to the dir you want the files sent to *
- * after they are processed (warp text added). So far this does not do zoo *
- * arc, lha and other files. but 99% of the files you get will be dms, wrp *
- *.lzh or doc files. also it sets a flag which re-runs my top util if a dms *
- * file has been processed (natch cause you wanna update the uploader *
- * especially if he is on the top list... this way you dont have to run the *
- * top util everytime a user logs off. The current version of Top is v1.9a *
- * You also must have Arexx and generate a warpsig msg thru DTR & WTR to *
- * add your warp text. I know this seems a little confusing but once you *
- * get this completely set up, you wil never have to manually add your own *
- * WARP TEXT. I did this in arexx since the actual warp text adders are *
- * already written is assy or C, Arexx only hooks this shit up to do the job.*
- * under my 33 mhz 030 its sufficient, especially since I don't have to add *
- * my warp text by hand.. *
- * READ Thru thos code so you can lear a little yourself & since I am doing *
- * Tthese docs while fucked up I probably missed something *
- * SpaZM ... 407 631-9123... SCOOPEX */
-
- /* I INCLUDED AN ExAMPLE OF MY head.doc and warpsig that is appended to *.doc*
- * files. You create your own & install in the BBS: dir */
-
- /* in your bbsbatch file add a line execute s:test
- * and in the s:test file have this one line .. RX AECONTROL and this program *
- will be executed. remember to copy AEcontrol to your Rexx: dir & set the *
- * s bit... protect Rexx:AEControl +S
- * SpaZM ... 407 631-9286... SCOOPEX */
-
-
- /*==================CUT HERE =====================================*/
- conf.3 = "BBS:Elite/Upload/"
-
-
- /* adds my dmstext to dms files */
- YES = 1
- NO = 0
- TRUE = YES
- FALSE = NO
- dms_total = 0
- warp_total = 0
- newdir = "DH1:BBS/Files/Elite/" /* dir to move added text files to. */
- descname = "BBS:Elite/dir4"
- donewtop = FALSE /* if set, re-run top util */
-
- r = 3 /* go thru every conference I only use 6 for uploads */
- call workEM conf.r
-
- ADDRESS COMMAND "date >>RAM:lastwork" /* save date of list time we ran */
- exit
-
- /* This is the heart of the program to add mytest to the end of files */
- workEM:
- arg dirname
-
- /* make sure dirname ends in either ':' or '/' */
- if right(dirname,1) ~= ':' then
- if right(dirname,1) ~= '/' then dirname = dirname || '/'
-
-
- 'set dateformat=0'
- out. = 0
-
- /* build a list in ram of all files in conf upload dir */
- ADDRESS COMMAND 'list >ram:shit 'dirname'#? dates nohead'
-
- call get_tempfile(FALSE) /* read in the file it built */
- if RESULT == FALSE then return /* no files to check */
-
-
- do z = 1 to out.0
- suffix = UPPER(Right(word(out.z,1),4))
- select
- /* when suffix == ".WRP" then call do_warp(z)*/
- when suffix == ".DMS" then DO
- call do_dms(z)
- ADDRESS COMMAND "DIRSIZE "descname " " newdir || word(out.z,1)
- END
- when suffix == ".LZH" then DO
- call do_lharc(z)
- ADDRESS COMMAND "DIRSIZE "descname " " newdir || word(out.z,1)
- END
- when suffix == ".LHA" then DO
- call do_lz(z)
- ADDRESS COMMAND "DIRSIZE "descname " " newdir || word(out.z,1)
- END
- when suffix == ".DOC" then DO
- call do_doc(z)
- ADDRESS COMMAND "DIRSIZE "descname " " newdir || word(out.z,1)
- END
- when suffix == ".TXT" then DO
- call do_doc(z)
- ADDRESS COMMAND "DIRSIZE "descname " " newdir || word(out.z,1)
- END
- otherwise NOP
- end
- end
-
- return
-
- /* NOTE: create a file in your BBS: dir called head.doc and in this file
- put one control character. This will begin the doc files. ALSO
- make a file called BBS:WarpSIg to be added to the end of the doc file
- */
- /* THIS DOES .DOC FILES */
- do_doc: /* add a control char to top of doc file, the my add at the end */
- arg i
-
- ADDRESS COMMAND "join BBS:head.doc " dirname || word(out.i,1) " BBS:warpsig as " newdir || word(out.i,1)
- ADDRESS COMMAND "Delete " dirname || word(out.i,1) " quiet"
- return
-
- do_dms:
- arg i
-
- /* remove text file file to ram: */
- ADDRESS COMMAND "DTR_V0.5 "dirname || word(out.i,1)
-
- /* add my text to the file */
- ADDRESS COMMAND 'Join 'dirname || word(out.i,1) 's:dmstext.dms to ram:'word(out.i,1)
-
- /* copy ram: file back to dir */
- ADDRESS COMMAND 'copy ram:'word(out.i,1) ' ' dirname
-
- ADDRESS COMMAND "Delete " "ram:" || word(out.i,1) " quiet" /* delete the file in ram after copying */
-
- /* reset date back to real date & time it was uploaded */
- ADDRESS COMMAND 'setdate 'dirname || word(out.i,1) word(out.i,4) left(word(out.i,5),5)
-
- /* Move file to our holding dir, but users can still dnload */
- ADDRESS COMMAND "Copy "dirname || word(out.i,1) " " newdir " dates" /* move file */
- ADDRESS COMMAND "Delete "dirname || word(out.i,1) " quiet" /* move file */
-
- donewtop = TRUE /* it was a decent size file so redo top listings */
-
- return
-
- do_lharc:
- arg i
-
- /* add my text to the lzh files */ /* chage this to your readme file*/
- ADDRESS COMMAND "Lharc a "dirname || word(out.i,1)" s:scoopex.txt.displayme" /* add my bbs ad */
-
- /* move the file to our hold dir after adding our text */
- ADDRESS COMMAND "Copy " dirname || word(out.i,1) " " newdir " dates"
- ADDRESS COMMAND "Delete " dirname || word(out.i,1) " quiet"
-
- return
-
- do_lz:
- arg i
-
- /* add my text to the lha files */ /* chage this to your readme file*/
- ADDRESS COMMAND "LZ a "dirname || word(out.i,1)" s:scoopex.txt.displayme" /* add my bbs ad */
-
- /* move the file to our hold dir after adding our text */
- ADDRESS COMMAND "Copy " dirname || word(out.i,1) " " newdir " dates"
- ADDRESS COMMAND "Delete " dirname || word(out.i,1) " quiet"
-
- return
-
- do_warp: /* do warp files */
- arg i
-
- /* remove text file file to ram: */
- ADDRESS COMMAND "WTR "dirname || word(out.i,1)
-
- /* add my text to the file */
- ADDRESS COMMAND 'warpck 'dirname || word(out.i,1)
-
- x = "Copy " dirname || word(out.i,1) " " newdir " dates" /* move the file */
- ADDRESS COMMAND x
- x = "Delete " dirname || word(out.i,1) " quiet" /* move the file */
- ADDRESS COMMAND x
-
- return
-
-
- /* This Replaces the Execio Command used in the Wshell version *
- * get the temp file in ram and set up array... *
- * return # of files in array.0 */
-
- get_tempfile:
- arg flag
- out. = 0
- i = 1
-
- if ~ Open(fp,"ram:shit",'R') then do
- return FALSE
- end
-
- do while ~ EOF(fp)
- out.i = readln(fp);
- i = i +1
- end
- call close(fp)
- out.0 = i-2
- if out.0 < 1 then return FALSE
- return TRUE
-
-